﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
	x:Class="Mad.Nug.ViewItem"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait"
	shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">
    
    <phone:PhoneApplicationPage.Resources>
        <Storyboard x:Name="ExitPage">
            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="GridProj" Storyboard.TargetProperty="RotationY" From="0" To="90" Duration="00:00:00.200">
            </DoubleAnimation>
            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="GridProj" Storyboard.TargetProperty="LocalOffsetX" From="0" To="-200" Duration="00:00:00.200">
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="EnterPage">
            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="GridProj" Storyboard.TargetProperty="RotationY" From="-90" To="0" Duration="00:00:00.200">
            </DoubleAnimation>
            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="GridProj" Storyboard.TargetProperty="LocalOffsetX" From="200" To="0" Duration="00:00:00.200">
            </DoubleAnimation>
        </Storyboard>        
    </phone:PhoneApplicationPage.Resources>

    <Grid Background="White">
        <Grid  Name="ContentPanel" >
            <Grid.Projection>
                <PlaneProjection  x:Name="GridProj" RotationX="0" RotationY="0" RotationZ="0" LocalOffsetX="0" GlobalOffsetZ="0"></PlaneProjection>
            </Grid.Projection>
            <Grid.RowDefinitions>
                <RowDefinition Height="75"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
        
            <Image Source="/Mad.Nug;component/Themes/Images/Header.jpg"></Image>
            <TextBlock Grid.Row="1" FontSize="24" Foreground="#FFA5C536" Text="{Binding Title}" FontFamily="Segoe WP" Margin="5" TextWrapping="Wrap"></TextBlock>
            <controls:Pivot Grid.Row="2">
                <controls:PivotItem>
                    <controls:PivotItem.Header>
                        <TextBlock Text="Artículo" Foreground="{StaticResource PhoneAccentBrush}"></TextBlock>
                    </controls:PivotItem.Header>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                            <RowDefinition Height="60"></RowDefinition>
                        </Grid.RowDefinitions>

                        <ProgressBar x:Name="pbarloading" Margin="0,5,0,0" Grid.Row="0" VerticalAlignment="Top" IsIndeterminate="True">
                            <ProgressBar.Foreground>
                                <LinearGradientBrush EndPoint="0.967,0.277" StartPoint="0.03,0.008">
                                    <GradientStop Color="#FF13FF00" Offset="1"/>
                                    <GradientStop Color="#FF12F900"/>
                                    <GradientStop Color="#FFFCA200" Offset="0.519"/>
                                </LinearGradientBrush>
                            </ProgressBar.Foreground>
                        </ProgressBar>
                        <phone:WebBrowser x:Name="browser" Margin="5" Grid.Row="1"/>

                        <HyperlinkButton Grid.Row="2" Content="Abrir artículo original en Internet Explorer." Click="HyperlinkButton_Click" Foreground="{StaticResource PhoneAccentBrush}" />
                    </Grid>
                </controls:PivotItem>
                <controls:PivotItem>
                    <controls:PivotItem.Header>
                        <TextBlock Text="Comentarios" Foreground="{StaticResource PhoneAccentBrush}"></TextBlock>
                    </controls:PivotItem.Header>
                    <ListBox Name="lstComments" Margin="5" ItemTemplate="{StaticResource plantillaComments}" ItemsSource="{Binding Items}">
                    </ListBox>
                </controls:PivotItem>
            </controls:Pivot>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>